Power supply apparatus with chargeable battery and charge/discharge method

ABSTRACT

The present invention provides a battery charging/discharging method for effectively using the battery energy of a power supply apparatus with a plurality of chargeable batteries. The power supply apparatus in which batteries are connected in parallel to the node of an external power source and a load comprises a charge/discharge monitor unit for judging whether the external power source is in a state where a load is driven and sufficient voltage to charge the batteries is outputted or in a state where sufficient voltage is not outputted and a discharge current should be supplied from the batteries to the load, switches inserted in series with each of the batteries, and an on/off control unit for controlling the on/off operation of the switches according to the output of the charge/discharge monitor unit and the charging/discharging state of each battery.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a power supply apparatus usingchargeable batteries. Portable devices such as a notebook personalcomputer, etc. can usually be operated by both AC mains and a battery.When the portable devices are operated by the AC mains, an AC adapter isused. The AC adaptor is designed so as to charge the batteries whilealso supplying a load with power. The present invention relates to apower supply apparatus for such a device installed with a plurality ofchargeable batteries.

[0003] 2. Description of the Related Art

[0004]FIG. 1 shows the configuration of a conventional power supplyapparatus with chargeable batteries. The operation of this conventionalpower supply apparatus is described in detail in the following priorapplication.

[0005] Laid-open Patent Publication No. 8-137814 (9-322431)

[0006] Inventor: Seiya Kitagawa

[0007] Title of the Invention: Power supply apparatus

[0008] In FIG. 1, an AC adaptor is connected to the external powersource terminal, power supplied from the AC adaptor drives a load 10through a diode 9, and also charges a battery 14 through a DC-DCconverter 11 for charging. When the AC adaptor is not connected or thevoltage drops to an abnormally low level, the potential of the cathodeside of the diode 9 falls, this fall of potential is detected by acharge/discharge monitor circuit 16, and the PWM (Pulse With Modulation)control circuit 25 inside the DC-DC converter 11 is controlled by theamount of potential drop. Thus, a FET 21 is always kept on, and thedischarge current of the battery 14 is supplied to the load 10 throughthe DC-DC converter 11.

[0009] The DC-DC converter 11 is mainly used to regulate the voltagebetween the AC adaptor and the battery 14. The DC-DC converter 11controls the charge to the battery 14 by switching on/off the FET 21according to the control of a voltage error amplifier, a current erroramplifier and a PWM comparator inside the PWM control circuit 25. Forthe details of these operations, see the above-mentioned priorapplication.

[0010] In the conventional example shown in FIG. 1, since only onechargeable battery 14 (a single package) can be used, there was aproblem that the operation hours of a device driven by the batterycannot be extended by connecting a plurality of chargeable batteries inparallel. This is because when there is an imbalance in the chargestates of batteries connected in parallel, energy flows from chargedbatteries to less-charged batteries, and such a charging overcurrentwhich occurs in this situation may damage the batteries.

SUMMARY OF THE INVENTION

[0011] It is an object of the present invention to provide a powersupply apparatus such that the energy of the batteries may beeffectively used, even if a plurality of chargeable batteries areconnected in parallel, and a charge/discharge method of the batteries.

[0012] One embodiment of the present invention comprises acharge/discharge monitor unit for judging whether or not the powersupply apparatus with a plurality of chargeable batteries connected inparallel between a node of an external power source and a load, and acommon ground of the external power source and the load, is in a chargestate when the external power source outputs voltage sufficient to drivea load and to charge the batteries, or is in a discharge state where theexternal power source does not output sufficient voltage and a currentis discharged from the chargeable batteries to the load; switchesinserted between each of the plurality of batteries, and an ON/OFFcontrol unit for controlling the on/off operation of the switchesaccording to the output of the charge/discharge monitor unit and thecharge/discharge state of each of the plurality of batteries.

[0013] By controlling the switches for controlling the charge ordischarge current of each battery, the ON/OFF control unit prevents acurrent from flowing back from charged batteries to less-chargedbatteries, if there is an imbalance in the charge states of thebatteries.

[0014] Another embodiment further comprises a voltage equivalencedetector unit for detecting the equivalence of battery voltages betweenchargeable batteries, and a battery current direction judgement unit forjudging whether a current in each battery flows in a charge direction ordischarge direction.

[0015] When the charge/discharge monitor unit detects a charge state,for example, out of two batteries, one battery in which current isjudged to flow in a charge direction is charged by switching on/offswitches inserted in series and corresponding to the other battery inwhich current is judged to flow in a discharge direction, by the batterycurrent direction judgement unit. When a voltage equivalence is detectedbetween one battery during charging and the other battery by the voltageequivalence detector circuit, the charge of the other battery is thencontrolled by the ON/OFF control unit.

[0016] Another embodiment further comprises a discharge completiondetector unit for detecting the discharge completion state of eachchargeable battery, and a battery current direction detection unit fordetecting whether a current in each battery flows in a charge directionor discharge direction.

[0017] When the charge/discharge monitor unit detects a shift in statusfrom a charge state to a discharge state, for example, out of twobatteries, one battery in which a current is judged to flow in a chargedirection is charged by switching on/off switches inserted in series andcorresponding to the other battery in which a current is judged to flowin a discharge direction, by the battery current direction detectionunit. When the discharge time reaches a predetermined value, a controlis performed to repeat the processes of the current direction detectionand after by the battery current direction detector unit.

[0018] For the charge method of the plurality of chargeable batteries ofthe present invention, for example, the following methods are used in apower supply apparatus with a DC-DC (direct current-direct current)converter between the node of an external power source terminal and aload, and the node in parallel with a plurality of batteries for beingPWM-controlled when the batteries are charged with a current, andcomposing a directly-connected discharge route when a current isdischarged from a battery to a load.

[0019] When the DC-DC converter is constant-voltage-controlled so thatan output voltage may become constant, for example, out of twobatteries, only one battery in which a current flows in a chargedirection when charging is started is charged, and when the voltage ofthe battery during charging and the voltage of the other battery duringnot charging become equal, a control is performed so that the batterynot charged may be charged.

[0020] When the DC-DC converter is constant-current-controlled so thatan output current is constant, for example, out of two batteries, onebattery with a lower voltage is first charged, and when the voltage ofthe battery during charging and the voltage of the other battery duringnot charging become equal, a control is performed so that the batterynot charged may also be charged.

[0021] For the discharge method of the plurality of chargeable batteriesof the present invention, when the status of the power supply apparatusshifts from a battery charging state to a battery discharging state, forexample, a control is performed so that out of two batteries, onebattery during charging may be first discharged, and after the apparatusdetects the completion of the discharging, the other battery isdischarged.

[0022] As described above, according to the present invention, in apower supply apparatus where a plurality of chargeable batteries areconnected in parallel, switches are switched on/off so that the chargedenergy of the batteries may be effectively used.

BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The present invention will be more apparent from the followingdescription, when taken in conjunction with the accompanying drawings,in which;

[0024]FIG. 1 shows the configuration of a conventional power supplyapparatus with a chargeable battery.

[0025]FIG. 2 shows the principle configuration of the present invention.

[0026]FIG. 3 shows the basic configuration of the power supply apparatusof the present invention.

[0027]FIG. 4A shows a configuration example of a current detectorcircuit.

[0028]FIG. 4B is a graph showing the relationship between a detectedcurrent and an output voltage in a current detector unit.

[0029]FIG. 5 shows a configuration example of a charge/discharge monitorcircuit.

[0030]FIG. 6 shows a configuration example of a battery currentdirection detector circuit.

[0031]FIG. 7 shows a configuration example of a constantcurrent/constant voltage judgement circuit.

[0032]FIG. 8 shows another configuration example of a constantcurrent/constant voltage judgement circuit.

[0033]FIG. 9 shows a configuration example of a battery voltagecomparator circuit.

[0034]FIG. 10 shows a configuration example of a battery voltageequivalence detector circuit.

[0035]FIG. 11 explains the operation of the equivalence detector circuitshown in FIG. 10.

[0036]FIG. 12A shows a configuration example of a battery chargecompletion detector circuit.

[0037]FIG. 12B shows an example of setting a threshold voltage Vth inthe battery charge completion detector circuit in FIG. 12A.

[0038]FIG. 13 shows a configuration example of a battery dischargecompletion circuit.

[0039]FIG. 14 shows the first embodiment of the ON/OFF control circuitof the present invention.

[0040]FIG. 15 is a time chart showing the operation of the firstembodiment.

[0041]FIG. 16 shows the second embodiment of the ON/OFF control circuitof the present invention.

[0042]FIGS. 17A and 17B are time charts showing the operation of thesecond embodiment.

[0043]FIG. 18 shows the third embodiment of the ON/OFF control circuitof the present invention.

[0044]FIGS. 19A and 19B are time charts showing the operation of thethird embodiment.

[0045]FIG. 20 shows the fourth embodiment of the ON/OFF control circuitof the present invention.

[0046]FIG. 21 is a time chart showing the operation of the fourthembodiment.

[0047]FIG. 22 shows the fifth embodiment of the ON/OFF control circuitof the present invention.

[0048]FIGS. 23A and 23B are time charts showing the operation of thefifth embodiment.

[0049]FIG. 24 shows the sixth embodiment of the ON/OFF control circuitof the present invention.

[0050]FIG. 25 is a time chart showing the operation of the sixthembodiment.

[0051]FIG. 26 shows the seventh embodiment of the ON/OFF control circuitof the present invention.

[0052]FIG. 27 is a time chart showing the operation of the seventhembodiment.

[0053]FIG. 28 shows the eighth embodiment of the ON/OFF control circuitof the present invention.

[0054]FIG. 29 is a time chart showing the operation of the eighthembodiment.

[0055]FIG. 30 shows the ninth embodiment of the ON/OFF control circuitof the present invention.

[0056]FIG. 31 is a time chart showing the operation of the ninthembodiment.

[0057]FIG. 32 shows a configuration example of a power supply apparatusin the case where an ON/OFF control circuit is composed by amicroprocessor.

[0058]FIG. 33 is a flowchart showing a process corresponding to theON/OFF control circuit of the first embodiment.

[0059]FIG. 34 is a flowchart showing a process corresponding to theON/OFF control circuit of the second embodiment.

[0060]FIG. 35 is a flowchart showing a process corresponding to theON/OFF control circuit of the third embodiment.

[0061]FIG. 36 is a flowchart showing a process corresponding to theON/OFF control circuit of the fourth embodiment.

[0062]FIG. 37 is a flowchart showing a process corresponding to theON/OFF control circuit of the fifth embodiment.

[0063]FIG. 38 is a flowchart showing a process corresponding to theON/OFF control circuit of the sixth embodiment.

[0064]FIG. 39 is a flowchart showing a process corresponding to theON/OFF control circuit of the seventh embodiment.

[0065]FIG. 40 is a flowchart showing a process corresponding to theON/OFF control circuit of the eighth embodiment.

[0066]FIG. 41 is a flowchart showing a process corresponding to theON/OFF control circuit of the ninth embodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0067]FIG. 2 shows the principle configuration of the present invention.The diagram is the principle configuration of a power supply apparatusin the case where a plurality of chargeable batteries 5 are connected inparallel between the node of an external power source, for example, anAC adaptor and a load 10, and a common ground.

[0068] In FIG. 2, a charge/discharge monitor unit 1 judges whether thispower supply apparatus is in a charging state where an external powersource drives a load and outputs a voltage sufficient to chargebatteries, or in a discharging state where the external power sourcedoes not output a voltage sufficient to charge, and a current should bedischarged from the chargeable batteries.

[0069] The current detector unit 2 detects the current flowing in eachof a plurality of batteries 5. Although the current detector unit 2 isnot needed in all the embodiments of the present inventions describedlater, the current detector unit 2 is shown in FIG. 2, since the currentdetector unit 2 is needed in many of the embodiments.

[0070] Switches 3 are inserted in series in each of the plurality ofbatteries 5. When one of the switches 3 is switched on, a current routeis established, and a charging or discharging current a correspondingbattery 5 connected to the switch 3 flows through. Meanwhile, when theswitch 3 is switched off, the current route is disconnected, and thecharging or discharging current is stopped.

[0071] The ON/OFF control unit 4 controls the on/off state of theswitches 3 according to the charge/discharge state of each of theplurality of batteries 5.

[0072]FIG. 3 shows the basic configuration of the power supply apparatusof the present invention. The power supply apparatus shown in FIG. 3comprises a DC-DC converter 11 for charging, connected between a diode 9and a load 10, two switches 12 x and 12 y connected in parallel with theoutput side of the DC-DC converter 11, two resistors for currentdetection 13 x and 13 y connected in series between a correspondingswitch and ground, two chargeable batteries 14 x and 14 y, two currentdetector circuits 15 x and 15 y for detecting the charge/dischargecurrent of each battery, a charge/discharge monitor circuit 16, and anON/OFF control circuit 17 for performing a characteristic operation inthe present invention.

[0073] The DC-DC converter for charging comprises a capacitor 20 foreliminating the ripple on a voltage supplied from a power sourceconnected to an external power source terminal, for example, an ACadaptor through a diode 9, and a FET 21 switched on/off when twobatteries 14 x and 14 y are to be charged to control charging current,and is always on when these batteries are discharged, a smoothingreactance 22, a smoothing capacitor 23, a fly-wheel diode 24, and a PWMcontrol circuit 25 for controlling the on/off of the FET 21 when thebatteries 14 x and 14 y are to be charged. In FIG. 3, although allconnections needed in the embodiments described later are shown, all theconnections are not necessarily needed in all the embodiments.

[0074] In the present invention, although the on/off operation of bothswitches 12 x and 12 y is controlled according to a charge/dischargestate of the batteries 14 x and 14 y, the control is performed by theON/OFF control circuit 17. Therefore, the embodiment of the ON/OFFcontrol circuit 17 is the main content of the present invention. Priorto the description of the embodiment of the ON/OFF control circuit 17,partial circuits needed to describe the embodiment of the ON/OFF controlcircuit 17 are described below with reference to FIGS. 4 through 13.

[0075]FIG. 4 explains a configuration example of the two currentdetector circuits 15 shown in FIG. 3. In FIG. 4A, the current detectorcircuit 15 comprises three operation amplifiers 27 through 29 and sevenresistors r₁ through r₇. This circuit is a so-called instrumentationamplifier, in which r₂=r₃, r₄=r₅ and r₆=r₇.

[0076] In FIG. 4A, when a current flowing in a resistor R for currentdetection is assumed to be I, the output voltage of the instrumentationamplifier V_(out) can be given by the following expression;

V _(out)=(r ₇ /r ₄){(1+2r ₂ /r ₁)RI}+V _(ref)

[0077] where r₂=r₃, r₄=r₅ and r₆=r₇.

[0078] In FIG. 4A, the positions of the battery side and switch side arethe reverse of the positions shown in FIG. 3, and the positive directionof a current I is the discharge direction of the battery current.

[0079] According to the above expression, as shown in FIG. 4B, it isfound that if the output voltage V_(out) of the instrumentationamplifier, that is, the current detector circuit, is greater than areference voltage V_(ref), the current I flowing in the resistor R forcurrent detection is a discharging current, and if the output voltageV_(out) of the current detector circuit is less than a reference voltageV_(ref), the current I flowing in the resistor R for current detectionis a charging current.

[0080]FIG. 5 shows the configuration of a charge/discharge monitorcircuit 16 shown in FIG. 3. In the diagram the charge/discharge monitorcircuit 16 comprises a comparator 31 for outputting an H (high level)when an input voltage to the DC-DC converter for charging 11 shown inFIG. 3, that is, the voltage on the cathode side of the diode 9, and thevoltage V₀ of a reference voltage source 32, are inputted, and thevoltage on the cathode side of the diode 9 is greater than the voltageV₀. According to the present invention the two batteries 14 x and 14 yare judged to be in a charging state, if an AC adaptor as an externalpower source is connected to the anode side of the diode 9 in FIG. 3 andpower is supplied from the AC adaptor to a load 10, while both batteries14 x and 14 y are judged to be in a discharging state, if an AC adaptoris disconnected and power is supplied from both batteries 14 x and 14 yto the load 10.

[0081] Since if the AC adaptor is disconnected, the voltage on thecathode side of the diode 9 becomes lower compared with when the ACadaptor is connected, an L (low level) for indicating a dischargingstate is outputted from the comparator 31, if the voltage on the cathodeside of the diode 9 becomes lower than the voltage V₀ of the referencevoltage source 32 in FIG. 5. The V₀ of this reference voltage source 32is set, for example, to a level lower than the voltage on the cathodeside of the diode 9 when the AC adaptor is connected, and to a levelhigher than the voltages of the batteries 14 x and 14 y.

[0082]FIG. 6 shows a configuration example of a battery currentdirection detector circuit used in some embodiments described later. Inthe diagram the current detector circuit 15 shown in FIG. 4A is used,and in addition to the current detector circuit 15 is provided acomparator 35 to which the output of the current detector circuit 15 andthe reference voltage V_(ref) shown in FIG. 4A are inputted. Thecomparator 35 provides an output for indicating the dischargingdirection of a current as an H and the charging direction of the currentas an L when the output V_(out) of the current detector circuit 15 isgreater than the reference voltage V_(ref), and when the output V_(out)of the current detector circuit 15 is less than the reference voltageV_(ref), respectively. It is clear from FIG. 4B that the H and L meandischarging and charging, respectively.

[0083] As explained in the above-mentioned prior application, whencharging the batteries, such a constant voltage control that the outputvoltage of the DC-DC converter 11 is constant is performed over a smallcurrent range, and such a constant current control that the outputcurrent of the converter is constant is performed if the current reachesa certain level. In some embodiments described later the on/off controlof a switch is performed corresponding to either a constant voltagecontrol (mode) or a constant current control (mode). For this reason, itbecomes necessary to judge whether the charging of the batteries 14 xand 14 y is performed in a constant voltage mode or a constant currentmode.

[0084]FIG. 7 shows a configuration example of a constantcurrent/constant voltage judgement circuit for judging whether thecharging of the batteries 14 x and 14 y is performed in a constantvoltage mode or a constant current mode. The circuit shown in FIG. 7comprises a voltage error amplifier 38 and a current error amplifier 39which compose the PWM control circuit 25 shown in FIG. 3, and acomparator 42 for comparing the output of the voltage error amplifier 38and the output of a current error amplifier 39. As described above inthe prior application, the PWM comparator 40 outputs a gate controlsignal for switching on the FET transistor 21 shown in FIG. 3 when ahigher input voltage value out of the two inputs to the two inversioninput terminals is lower than the voltage of a triangular wave outputtedby an oscillator 41. If the output of the voltage error amplifier 38 ishigher than the output of the current error amplifier 39, charging isperformed in a constant voltage mode, and the gate signal of the FET 21is controlled by the PWM control circuit 25 so that the voltage errormay be reduced. On the other hand, if the output of the current erroramplifier 39 is higher than the output of the voltage error amplifier38, charging is performed in a constant current mode, and the gatesignal of the FET 21 is controlled by the PWM control circuit 25 so thatthe current error may be reduced and the output current is constant.Accordingly, it is judged that charging is performed in a constantvoltage mode and a constant current mode, if the comparator 42 outputsan H and an L, respectively.

[0085]FIG. 8 shows another configuration example of a constantcurrent/constant voltage judgement circuit. The judgement circuit ofFIG. 8 comprises a comparator 48 and a reference voltage source 49.Since when charging is performed in a constant voltage mode, thecharging voltage of the batteries, for example, the output voltage ofthe converter 11 in FIG. 3, becomes higher than the output in a constantcurrent mode, the comparator 48 outputs an H if the charge voltagebecomes higher than the voltage Vs of the reference power source 49corresponding to the value at the time of constant current charging, andit is judged from the output that the charging is performed in aconstant voltage mode.

[0086] In some embodiments described later, when charging two batteriesin a constant current mode, a control is performed so that aless-charged battery may be charged first. A battery voltage comparatorshown in FIG. 9 is used to compare the charge states. That is, it isjudged that a battery with a higher voltage has a greater charge.Although the circuit shown in FIG. 9 is substantially the same as thebattery current direction detector circuit shown in FIG. 6, the circuitshown in FIG. 9 differs in that the inputs are not the voltages acrossthe resistor for current detection, but are the voltages Vx and Vy ofboth batteries. Then, the comparator 51 outputs an H when Vx>Vy.

[0087] In some embodiments described later the on/off control of theswitches is controlled, if the voltages of both batteries are almost thesame. FIG. 10 shows a configuration example of a battery voltageequivalence detector circuit for judging whether or not the voltages ofboth batteries are almost the same in order to control the on/offoperation. The circuit in FIG. 10 comprises two comparators 53 and 54,two offset voltage sources 55 and 56, and an AND circuit 57.

[0088]FIG. 11 explains the operation of the equivalence detector circuitshown in FIG. 10. In FIG. 11 the output A of the comparator 53 and theoutput B of the comparator 54 corresponding to the voltages Vx and Vy,respectively, and the output C of the AND circuit 57, are shown. Asshown in FIG. 11, the output C of the AND circuit 57 becomes H while thesum of Vx and an offset voltage is greater than Vy, and the sum Vy andthe offset voltage is greater than Vx. That is, if the absolute value ofthe difference between Vx and Vy is less than the offset voltage, an Hfor indicating that both battery voltages are equal is outputted.

[0089] In some embodiments described later the control operation isswitched, if the charging of one of the batteries is completed whencharging both batteries. FIG. 12A shows a configuration example of abattery charge completion detector circuit. The detector circuit in FIG.12A comprises a current detector circuit 15, a comparator 58 and athreshold voltage source 59 for providing the comparator 58 with athreshold voltage. Since the charging current of the battery decreasesas the charge increases, the charging is judged to be completed when thecharging current of the battery becomes less than a certain value. Asdescribed earlier, the battery current becomes 0 when the output of thecurrent detector circuit reaches the reference voltage V_(ref).Accordingly, by setting the threshold voltage a little bit lower thanthis reference voltage V_(ref), as shown in FIG. 14B, the comparator 58outputs an H indicating the completion of the charging when the outputof the current detector circuit 15 exceeds the threshold voltage Vth.

[0090] Furthermore, in some embodiments of the present invention, thecontrol operation is switched when the discharging of one battery iscompleted. FIG. 13 shows a configuration example of a battery dischargecompletion circuit for switching the control operation. The circuitshown in FIG. 13 is for detecting the completion of the discharging of,for example, the battery 14 x. The comparator 61 outputs an H indicatingthe completion of the discharging when the voltage of the battery 14 xbecomes lower than the threshold voltage Vth of the threshold voltagesource 62.

[0091] Next, the embodiment of the ON/OFF control circuit 17 in FIG. 3of the present invention is described below using a variety of thepartial circuits described above.

[0092]FIG. 14 shows the first embodiment of the ON/OFF control circuit17 of the present invention. The ON/OFF control circuit 17 in FIG. 14comprises a battery X charge completion detector circuit 66 x, a batteryY charge completion detector circuit 66 y, two AND circuits 67 and 68,and two inverters 69 and 70.

[0093] Although in FIG. 14 a NOR circuit 64 and an inverter 65 are addedto the configuration of FIG. 3, the NOR circuit 64 and inverter 65 arefor controlling the on/off operation of the FET 21 using the outputs ofthe charge/discharge monitor circuit 16 and the PWM control circuit 25.That is, the output of the charge/discharge monitor circuit 16 becomes Hwhen charging the batteries, and the output of the inverter 65 becomesL. Thus, the output of the PWM control circuit 25 is inverted by the NORcircuit 64, and is provided to the gate of the FET 21. Since the FET 21is, for example, a P channel device, the FET 21 is on when the output ofthe PWM control circuit 25 is H, that is, the output of the NOR circuit64 is L, and the on/off operation of the FET 21 is controlled by theoutput of the PWM control circuit 25. On the other hand, whendischarging the batteries, since the output of the charge/dischargemonitor circuit 16 becomes L, the output of the inverter 65 becomes H,and the output of the NOR circuit 64 becomes L regardless of the outputof the PWM control circuit 25. Accordingly, when discharging thebatteries, the FET 21 is always kept on.

[0094] In the first embodiment in FIG. 14, a control operation isperformed when discharging the batteries. For example, first, a switch12 x is switched on, and the battery 14 x is charged. Then, after thecompletion of the charging, switches 12 x and 12 y are switched off andon, respectively, and the battery 14 y is charged.

[0095]FIG. 15 is a time chart showing the operation of the firstembodiment shown in FIG. 14. When in FIG. 14, an AC adaptor is connectedand the power supply apparatus enters the charging state, the output Aof the charge/discharge monitor circuit 16 becomes H. At this moment,the outputs B and C of the two charge/discharge completion detectorcircuits 66 x and 66 y are both L, and thereby the output of the ANDcircuit 67 (AND1) becomes H. Accordingly, the switch 12 x is switchedon, and the charging of the battery 14 x is started.

[0096] When the charging is completed, the signal B becomes H.Accordingly, the output of the AND circuit 67 becomes L, and the switch12 x is switched off. At this moment, since the signal C is L, all thethree inputs to the AND circuit 68 are H, the output becomes H, theswitch 12 y is switched on, and the battery 14 y is charged. When thecharging of the battery 14 y is completed, the output C of thecharge/discharge completion circuit 66 y becomes H, the output of theAND circuit 68 becomes L, and the switch 12 y is switched off.

[0097]FIG. 16 shows the second embodiment of the ON/OFF control circuitof the present invention. The circuit of FIG. 16 comprises a batteryvoltage comparator circuit 71 for comparing the voltages of the twobatteries 14 x and 14 y when charging the batteries, and two chargecompletion detector circuits 66 x and 66 y corresponding to eachbattery, similar to the charge completion detector circuits shown inFIG. 14. The ON/OFF control circuit compares the battery voltages whencharging is started, switches on first a switch corresponding to thebattery with a lower voltage, and when the charging of this battery iscompleted, charges the other battery.

[0098]FIGS. 17A and 17B are time charts showing the operation of thesecond embodiment shown in FIG. 16. First, when the charge/dischargemonitor circuit 16 in FIG. 16 detects the charging state of the powersupply apparatus, the output becomes H, corresponding to which theoutput E of a mono-stable multi-vibrator (mono-multi) 72 becomes H.Then, the result is inputted to an AND circuit 74 (AND1). On the otherhand, the battery voltage comparator circuit 71 compares the voltages ofboth batteries 14 x and 14 y, and when the voltage of the battery 14 xis greater than the voltage of the battery 14 y, the output D becomes Has shown in FIG. 17A. In this case, the output of the AND circuit 74becomes H, and the output F of a flip-flop 75 also becomes H. Since theoutputs B and C of the charge completion detector circuits 66 x and 66 yare both L at this moment, as a result the output of an OR circuit 78(OR1) and the output of an OR circuit 80 (OR2) become L and H,respectively.

[0099] When the output E of the mono-multi 72 becomes L after a certaintime elapses, the output AND1 of the AND circuit 74 becomes L, allinputs to an AND circuit 81 become H, and the output becomes H. Then,the switch 12 y is switched on, and the battery 14 y is charged. At thistime too, since the outputs B and C of both charge completion detectorcircuits 66 x and 66 y are both L, the output of an inverter 83 is H,and this output is inputted to the AND circuit 81.

[0100] When the charging of the battery 14 y is completed, the output Cof the charge completion detector circuit 66 y becomes H. As a result,the output AND3 of the AND circuit 81 becomes L, and the switch 12 y isswitched off. Simultaneously, the output of the OR circuit 78 (OR1)becomes H, as a result the output of the AND circuit 79 (AND2) becomesH. Then, the switch 12 x is switched on, and the charging of the battery14 x is started.

[0101] When the charging of the battery 14 x is completed, the output Bof the charge completion detector circuit 66 x becomes H, as a resultthe output AND2 of the AND circuit 79 becomes L, and the switch 12 x isswitched off.

[0102]FIG. 17B is a timechart showing the operation in the case whereout of the two batteries, the voltage of the battery 14 y is higher thanthe voltage of the battery 14 x in an initial state. In this case, sincethe output D of the battery voltage comparator circuit 71 is L even ifthe output A of the charge/discharge monitor circuit 16 becomes H, onlythe output E of the mono-multi 72 becomes H. Since the outputs of twoinverters 77 and 82 are both H, the output AND2 of the AND circuit 79becomes H and the switch 12 x is switched on when the output E becomesL.

[0103] When the charging of the battery 14 x is completed, the output Bof the detector circuit 66 x becomes H, the output AND2 of the ANDcircuit 79 becomes L, and the switch 12 x is switched off.Simultaneously, the output of the OR circuit 80 becomes H, the outputAND3 of the AND circuit 81 becomes H since the output of the inverter 83is H, and the switch 12 y is switched on. Then, when the charging of thebattery 14 y is completed, the output C of the detector circuit 66 ybecomes H, the output AND 3 of the AND circuit 81 becomes L, and theswitch 12 y is switched off.

[0104]FIG. 18 shows the third embodiment of the ON/OFF control circuitof the present invention. The ON/OFF control circuit of the thirdembodiment comprises battery current direction detector circuits 86 xand 86 y for detecting whether the current of each battery is in acharging direction or a discharging direction, in addition to a batteryvoltage equivalence detector circuit 85. The ON/OFF control circuitswitches off a switch on the side of the battery in which the currentflows in a discharging direction when starting charging, charges theother battery in which the battery current flows in a chargingdirection, and when the voltage of the battery being charged and thevoltage of the battery connected to the switch which is switched offbecome equal, the switched-off switch is also switched on. This is toprevent an abnormally increased charging current from damaging thebatteries, because when the charges in the batteries are imbalanced, theless-charged battery is charged by the charged battery when startingcharging.

[0105]FIGS. 19A and 19B are time charts showing the operation of thethird embodiment in FIG. 18. FIG. 19A is a timechart in the case whereit is judged that the charge of the battery 14 x is greater than thecharge of the battery 14 y and the current flows in a dischargingdirection, when starting charging. When the power supply apparatusenters a charging state and the output A of the charge/discharge monitorcircuit 16 in FIG. 18 becomes H, the outputs of two inverters 89 and 90are both H, since the outputs of two battery current direction detectorcircuits 86 x and 86 y are both L. As a result, the outputs of two ANDcircuits 91 and 92 (AND1 and AND2) become both H, two switches 12 x and12 y are both switched on, and the battery current direction isdetected.

[0106] When, as mentioned above, it is judged that the charge of thebattery 14 x is greater than the charge of the battery 14 y and thebattery current flows in a discharging direction, the output B of thebattery current direction detector circuit 86 x becomes H, as a resultthe output E of a flip-flop 87 becomes H, and the output AND1 of the ANDcircuit 91 becomes L. Thus, the switch 12 x is switched off and only thebattery 14 y is charged.

[0107] When the voltage of the battery 14 x rises and it is judged bythe battery voltage equivalence detector 85 that the voltage of thebattery 14 x becomes equal to the voltage of the battery 14 y, theoutput D of the battery voltage equivalence detector 85 becomes H, andthe output E of the flip-flop 87 is reset and becomes L. As a result,the output of the AND circuit 91 becomes H, the switch 12 x is switchedon, and both batteries are charged.

[0108]FIG. 19B is a timechart in the case where the charge of thebattery 14 y is greater than the charge of the battery 14 x. In thiscase, although there are some differences from the case shown in FIG.19A in that the output of the battery current direction detector circuit86 y becomes H, the basic operations are the same as those in FIG. 19A.Therefore, the detailed description is omitted here.

[0109]FIG. 20 shows the fourth embodiment of the ON/OFF control circuitof the present invention. Although in this fourth embodiment, whenstarting charging, the direction of each battery current is detected inthe same way as in FIG. 18, a switch on the side of the battery in whichthe current flows in a discharging direction is switched off, and theother battery is charged, the embodiment differs from that in FIG. 18 inthat after a certain time elapses, the two switches are both switchedon, and the operations of the detection of the direction of the batterycurrent and after are repeated. For this reason, in FIG. 20 a mono-multi95 for specifying this certain time, an OR circuit 94 at the input stageof the mono-multi 95, a flip-flop 96 at the output stage of themono-multi 95, and an inverter 97 for resetting the flip-flop 96 areadded to the configuration shown in FIG. 18.

[0110]FIG. 21 is a time chart showing the operation of the fourthembodiment shown in FIG. 20. When the apparatus enters a charging stateand the output A of the charge/discharge monitor circuit 16 becomes H,the outputs of the two AND circuits 91 and 92 become H as shown in FIG.18, the switches 12 x and 12 y are both switched on, and the directionsof the battery currents are detected by the two current directiondetector circuits 86 x and 86 y. As shown in FIG. 19A, when the currentof the battery 14 x is judged to be in a discharging direction, theoutput B of the detector circuit 86 x becomes H. Accordingly, in FIG.21, the output D of the flip-flop 87, the output of the OR circuit 94(OR1) and the output F of the mono-multi 95 all become H, the outputAND1 of the AND circuit 91 becomes L, and the switch 12 x is switchedoff.

[0111] After a certain time corresponding to the output pulse width ofthe mono-multi 95 elapses, the output F of the mono-multi 95 becomes L,and as a result the output G of the flip-flop 96 operating on thefalling edge becomes H. Then, the flip-flop 87 is reset, the output D ofthe flip-flop 87 becomes L, and the output AND1 of the AND circuit 91becomes H. Since the output of the OR circuit 94 becomes L, the outputof the inverter 97 becomes H, and as a result, the flip-flop 96 isreset, the period where the output G of the flip-flop 96 remains Hbecomes very short.

[0112] When the switch 12 x is also switched on, the direction of thebattery current is again detected and it is judged that the currentdirection of the battery is in a discharging direction, the output B ofthe detector circuit 86 x becomes H again, as a result the output D ofthe flip-flop 87, the output OR1 of the OR circuit 94 and the output Fof the mono-multi 95 all become H. Then, the output AND1 of the ANDcircuit 91 becomes L, the switch 12 x is switched off and the chargingof the battery 14 y is continued.

[0113] When the output F of the mono-multi 95 becomes L again, theoutput G of the flip-flop 96 becomes H, and the output D of theflip-flop 87 and the output OR1 of the OR circuit 94 both become L. As aresult, the output AND1 of the AND circuit 91 becomes H, and the switch12 x is switched on. If the results of the current direction detectionsfor the two batteries are both charging directions, after that bothbatteries 14 x and 14 y are charged.

[0114]FIG. 22 shows the fifth embodiment of the ON/OFF control circuitof the present invention. In the fifth embodiment, when charging isstarted the batteries, it is judged whether a charging is performed in aconstant current mode or in a constant voltage mode. In the case of aconstant voltage mode charging is controlled in the same way as in thethird embodiment shown in FIG. 18, while in the case of a constantcurrent mode the voltages of two batteries are compared, the batterywith a lower voltage is charged first, and when it is judged that thevoltages of both batteries become equal, both batteries are charged.

[0115] A constant current/constant voltage judgement circuit 101 in FIG.22 outputs a H while charging is performed in a constant voltage mode,as shown in FIGS. 7 and 8. In the constant voltage mode the output ofthe ON/OFF control circuit 102 in FIG. 18, that is, the outputs of twoAND circuits 91 and 92 become valid, and these outputs are used for theon/off control of the two switches 12 x and 12 y through AND circuits115 and 116 (AND3 and AND4) and OR circuits 112 and 113 (OR3 and OR4).In the case of the constant current mode the constant current/constantvoltage judgement circuit 101 outputs an L, which is provided to the twoAND circuits 110 and 111 (AND5 and AND6) through an inverter 114. Theon/off control by these two AND circuits of both switches becomesavailable by using these outputs.

[0116]FIGS. 23A and 23B are time charts showing the operation of thefifth embodiment. FIG. 23A is a timechart in the case where the voltageof the battery 14 x is higher than the voltage of the battery 14 y. Whenthe output A of the charge/discharge monitor circuit 16 shown in FIG. 22becomes H, the output G of a mono-multi 104, the output H of a flip-flop105 and the output of an OR circuit 108 (OR1) all become H. Then, whenthe output E of a battery voltage comparator circuit 71 becomes H, whichindicates that the voltage of the battery 14 x is higher than thevoltage of the battery 14 y, the output of an OR circuit 107 (OR5)becomes H, the flip-flop 105 is reset, and the output H of the flip-flop105, the output OR1 of the OR circuit 108 both become L. The output I ofa flip-flop 106 and the output of an OR circuit 109 (OR2) are both H.After a certain time corresponding to the output pulse width of themono-multi 104 elapses, the output G of the mono-multi 104 becomes L,the output of an inverter 117 becomes H, as a result the output AND6 ofthe AND circuit 111 becomes H, and the switch 12 y is switched onthrough the OR circuit 113.

[0117] When it is judged by a battery voltage equivalence detectorcircuit 85 that the voltages of both batteries become equal and theoutput D of the battery voltage equivalence detector circuit 85 becomesH, the flip-flop 106 is reset, but the output OR2 of the OR circuit 109remains H, and the output OR1 of the OR circuit 108 also becomes H.Thus, since the output AND5 of the AND circuit 110 becomes H and theoutput AND6 of the AND circuit 111 remains H, both switches 12 x and 12y are switched on and both batteries are charged.

[0118]FIG. 23B is a timechart in the case where the voltage of thebattery 14 y is higher than the voltage of the battery 14 x whencharging is started. In this case, when the output A of thecharge/discharge monitor circuit 16 becomes H, the output G of themono-multi 104, the output H of the flip-flop 105 and the output of theOR circuit 108 all become H. Then, when the output G of the mono-multi104 becomes L, the output AND5 of the AND circuit 111 becomes H, theswitch 12 x is switched on and the charging of the battery 14 x isstarted. When the output D of the battery voltage equivalence detectorcircuit 85 becomes H, the output OR2 of the OR circuit 109 becomes H. Asa result, both outputs of the AND circuit 111 and the OR circuit 113become H, the switch 12 y is switched on and both batteries are charged.

[0119]FIG. 24 shows the sixth embodiment of the ON/OFF control circuitof the present invention. In this embodiment, when the status of thepower supply apparatus charges to a battery discharge state, out of thetwo batteries one battery is first discharged, and when the dischargingcompletion of this battery is detected, the other battery is discharged.

[0120]FIG. 25 is a time chart showing the operation of the sixthembodiment shown in FIG. 24. The timechart is described assuming thatthe battery 14 x is first discharged in the diagram. First, when theoutput A of the charge/discharge monitor detector circuit 16 becomes L,which indicates that the battery is in a discharging state, the outputof an AND circuit 123 (AND1) becomes H, the switch 12x is switched onand the battery 14 x is discharged, since at this moment the outputs Band C of two discharge completion detector circuits 66 x and 66 y are L,which indicates that the discharging of the battery is not completed.

[0121] When the discharging of the battery 14 x is completed, the outputB of the discharge completion detector circuit 66 x becomes H, theoutput of the AND circuit 123 becomes L, and the output of an ANDcircuit 124 (AND2) becomes H. Thus, the switch 12 y is switched on andthe battery 14 y is discharged. Then, when the discharging of thebattery 14 y is also completed, the output C of the discharge completiondetector circuit 66 y also becomes H, the output of the AND circuit 124becomes L, and the switch 12 y is switched off.

[0122]FIG. 26 shows the seventh embodiment of the ON/OFF control circuitof the present invention. In the seventh embodiment the power supplyapparatus moves to a discharging state in a condition where the chargehas been so far controlled, that is, the on/off operation of the twoswitches has been maintained. When out of the two switches, for example,a switch 12 x is switched on and a battery 14 x is charged, the state ofthe switched is maintained so that the battery 14 x is discharged first.Then, after the discharging of this battery 14 x is completed, the otherbattery 14 y is discharged in the same way as the sixth embodiment shownin FIG. 24.

[0123]FIG. 27 is a time chart showing the operation of the seventhembodiment shown in FIG. 26. In FIG. 26, the status of the batteriescharges to a discharging state in a condition where out of the twooutputs of a charge ON/OFF control circuit 130, an output F is H and theswitch 12 x is switched on through an OR circuit 131 (OR1).

[0124] When the output A of a charge/discharge monitor circuit 16becomes L, the output of an inverter 133 becomes H. On the other hand,since the output of an OR circuit 132 (OR2) and the output B of adischarge completion detector circuit 66 x are both L, the output of anAND circuit 137 (AND1) is H. For this reason, the output of an ANDcircuit 134 (AND3) and the output D of a flip-flop 135 become both H,the output of the OR circuit 131 remains H, even if the output F of thecharge ON/OFF control circuit 130 becomes L, and the switch 12 x is kepton.

[0125] When the discharge completion detector circuit 66 x detects thedischarging completion of the battery 14 x, the output B of thedischarge completion detector circuit 66 x becomes H, and the output Dof the flip-flop 135 is reset. Then, the output OR1 of the OR circuit131 becomes L, and the switch 12 x is switched off. Since the output OR1of the OR circuit 131 becomes L, the output of an inverter 138 becomesH. Since at this time the output C of a discharge completion detectorcircuit 66 y is L, the outputs of AND circuits 141 (AND2) and 142(AND4), the output E of a flip-flop 143 and the output OR2 of the ORcircuit 132 all become H, a switch 12 y is switched on, and the battery14 y is discharged.

[0126] When the discharging of the battery 14 y is completed, the outputC of a discharge completion detector circuit 66 y becomes H. For thisreason, the outputs of the AND circuits 141 and 142 the output E of theflip-flop 143 and the output of the OR circuit 132 all become L, and theswitch 12 y is switched off. For the discharge ON/OFF control circuit139 of this seventh embodiment any of the ON/OFF control circuits of thefirst through fifth embodiments can be used.

[0127]FIG. 28 shows the eighth embodiment of the ON/OFF control circuitof the present invention. In this eighth embodiment, when the status ofthe batteries of the power supply apparatus charges to a dischargingstate, the detection of the current direction of the batteries isperformed, a switch corresponding to the battery in which the batterycurrent flows in a charging direction is switched off, and the otherbattery is discharged. Then, every time a certain time elapses, thedirections of the battery currents are detected, and the controlcorresponding to the result is repeated in the same way.

[0128]FIG. 29 is a time chart showing the operation of the eighthembodiment shown in FIG. 28. The timechart shown in FIG. 29 is describedfor the case where it is judged that out of the two batteries 14 x and14 y, the current of the battery 14 x is in a charging direction.

[0129] When the output A of the charge/discharge monitor circuit 16 inFIG. 28 becomes L, which indicates a discharging state, the outputs oftwo AND circuits 149 and 152 (AND1 and AND2) become both H, bothswitches 12 x and 12 y are switched on, and current flows in bothbatteries, since in an initial condition the outputs D and E of twoflip-flops 147 and 155, respectively, are both L. When the output B ofthe battery current direction detector circuit 86 x becomes L, whichindicates the charge status of the battery, the output D of theflip-flop 147 becomes H, and the output AND1 of the AND circuit 149becomes L, and the switch 12 x is switched off. Simultaneously, theoutput of an OR circuit 158 (OR3) becomes H, and the output F of amono-multi 159 becomes H. Then, since the switch 12 x is switched off,the battery current direction detector circuit 86 x stops the currentdirection detection operation, and after a little while the output B ofthe battery current direction detector circuit 86 x becomes H. Then, theoutput OR3 of the OR circuit 158 becomes L.

[0130] When the output F of the mono-multi 159 becomes L, the output Gof a flip-flop 160 operating on the falling edge becomes H, theflip-flop 147 is reset through an OR circuit (OR1), and the output D ofthe flip-flop 147 becomes L. Thus, the output of the AND circuit 149becomes H, the switch 12 x is switched on, and the direction of thebattery current is detected again. At this time the output of an ORcircuit (OR2) also becomes H.

[0131] When the output B of the battery current direction detectorcircuit 86 x becomes L again, which indicates a charging direction, theoutput D of the flip-flop 147 becomes H again, the output AND1 of theAND circuit 149 becomes L, and the switch 12 x is switched off. Then,the output OR3 of the OR circuit 158 becomes H, and the output F of themono-multi 159 becomes H again.

[0132] After a time corresponding to the pulse width of the output F ofthe mono-multi 159 elapses again, the output G of a flip-flop 160becomes H in the same way as described earlier, the flip-flop 147 isreset, and the output AND1 of the AND circuit 149 becomes H. For thisreason, the switch 12 x is switched on, and the current direction isdetected for a third time. When it is assumed that the two currentdirection detector circuits 86 x and 86 y detect that the currents ofboth batteries 14 x and 14 y are in a discharging direction, theflip-flop 147 is not reset, the output AND1 of the AND circuit 149remains H, and the switch 12 x is kept on. After that both batteries 14x and 14 y are discharged.

[0133]FIG. 30 shows the ninth embodiment of the ON/OFF control circuitof the present invention. In the ninth embodiment, like the eighthembodiment shown in FIG. 28, when the status of the batteries of thepower supply apparatus charges to a discharging state, the direction ofthe battery current is detected, a switch corresponding to one batterywhose current flows in a charging direction is switched off, and theother battery is discharged. Then, when it is judged that the voltagesof two batteries become equal, the switch which has so far been off isswitched on, and both batteries are discharged.

[0134]FIG. 31 is a time chart showing the operation of the ninthembodiment shown in FIG. 30. The timechart shown in FIG. 30 is describedfor the case where the current direction of the battery 14 x is in acharging direction when charging is started.

[0135] The output A of the charge/discharge monitor circuit 16 in FIG.30 becomes L, and as in FIG. 29 the outputs of two AND circuits 168 and174 (AND1 and AND2) both become H, both switches are switched on, andthe current directions are detected. At this moment, the outputs of twoOR circuits 169 and 172 (OR1 and OR2) become both L, since the output Aof the charge/discharge monitor circuit 16 which was H becomes L.

[0136] When the output B of the current direction detector circuit 86 xbecomes L, as described earlier, the output E of a flip-flop 166 becomesH, the output AND1 of the AND circuit 168 becomes L, and the switch 12 xis switched off. Then, when the output D of the battery voltageequivalence detector circuit 85 becomes H, which indicates that thevoltages of both batteries are equal, the outputs of the two OR circuits169 and 172 both become H, the flip-flop 166 is reset, and the output Eof the flip-flop 166 becomes L. For this reason, the output AND1 of theAND circuit 168 becomes H, the switch 12 x is switched on, and afterthat both batteries are discharged.

[0137] Although the hardware configurations of the variety ofembodiments of the ON/OFF control circuit of the present invention havebeen so far described in detail, this ON/OFF control circuit can also beconfigured using a microprocessor, and thereby the on/off operation ofboth switches can also be controlled by way of software. FIG. 32 shows aconfiguration example of such a power supply apparatus. In FIG. 32 amicroprocessor 180 is used instead of the ON/OFF control circuit 17shown in FIG. 3. The on/off control of two switches in this power supplyapparatus is described below with reference to FIGS. 33 through 41.

[0138]FIG. 33 is a flowchart showing a process corresponding to theON/OFF control circuit of the first embodiment shown in FIG. 14. Whenthe process is started as shown in FIG. 33, first in step S1 theswitches 12 x and 12 y are switched on and off, respectively, and thebattery 14 x is charged. In step S2 it is judged whether or not thecharging of the battery 14 x is completed. If the charge is completed,in step S3, contrary to the above, the switches 12 x and 12 y areswitched off and on, respectively, in step S4 it is judged whether ornot the charging of the battery 14 y is completed, and if the chargingis completed, the process is terminated.

[0139]FIG. 34 is a flowchart showing a process corresponding to theON/OFF control circuit of the second embodiment in FIG. 16. When theprocess is started as shown in FIG. 34, first, in step S6 both switches14 x and 14 y are switched off. In step S7 the voltages of bothbatteries are compared, and it is judged whether or not the voltage Vxof the battery 14 x is higher than the voltage Vy of the battery 14 y.If the voltage Vx is not higher than the voltage Vy, in steps S8 throughS11, as shown in FIG. 33, both batteries, first 14 x and then 14 y arecharged.

[0140] If in step S7 the voltage Vx of the battery 14 x is higher thanthe voltage Vy of the battery 14 y, in steps S12 through 15 bothbatteries, first 14 y and then 14 x, are charged.

[0141]FIG. 35 is a flowchart showing a process corresponding to theON/OFF control circuit of the third embodiment shown in FIG. 18. Whenthe process is started as shown in FIG. 35, first, in step S21 bothswitches 12 x and 12 y are switched on. In step S22, if as a result ofdetecting the current directions of both batteries it is judged that thecurrent Ix of the battery 14 x is in a discharging direction, in stepS23 the switch 12 x is switched off and the battery 14 y is charged.When in step S24 it is judged that the voltages of both batteries areequal, in step S25 the switch 12 x is switched on and the battery 14 xis charged. Then, in step S26, when it is judged that the charging ofboth batteries is completed, the process is terminated.

[0142] When in step S22 it is judged that the current direction of thebattery 14 x is not in a discharging direction, in step S27 it is judgedwhether or not the current Iy of the battery 14 y is in a dischargingdirection. If the current Iy is in a discharging direction, in steps S28through 30 the battery 14 x is charged until the voltages of bothbatteries become equal. After the voltages of both batteries becomeequal, both batteries are charged, and the process flow moves to theprocess in step S26. If in step S27 it is judged that the current of thebattery 14 y is not in a discharging direction, both batteries arecharged until in step S26 it is judged that the charging of bothbatteries is completed.

[0143]FIG. 36 is a flowchart showing a process corresponding to theON/OFF control circuit of the fourth embodiment shown in FIG. 20. InFIG. 36 the processes similar to those in FIG. 35 are executed. That is,if in step S22 it is judged that the current flow of the battery 14 x isin a discharging direction, in step S23 the switch 12 x is switched off,and then in step S31 the state is left as it is for a certain timecorresponding to the pulse width of the monostable multi-vibrator 95shown in FIG. 20. Then, the process flow returns to step S21, where bothswitches are switched on, and the processes of the detection of thebattery current direction and after are executed.

[0144] When in step S27 it is judged that the current direction of thebattery 14 y is in a discharging direction, in step S28 the switch 12 yis switched off, and then the processes in step S31 and after areexecuted. If in step S27 it is judged that the current direction of thebattery 14 y is not in a discharging direction, in step S26 thejudgement process is repeated until the charging of both batteries iscompleted.

[0145]FIG. 37 is a flowchart showing a process corresponding to theON/OFF control circuit of the fifth embodiment shown in FIG. 22. In FIG.37, different charge controls are employed depending on whether thecharging of the battery is controlled in a constant voltage mode or in aconstant current mode. When the process is started, first, in step S32it is judged whether or not charging is performed in a constant voltagemode. If the charging is performed in a constant voltage mode, in stepsS33 through S36, as shown in steps S21 through S24 in FIG. 35, as aresult of the current direction detection of the batteries it is judgedthat the current flow of the battery 14 x is in a discharging direction,the switch 12 x is switched off, and only the battery 14 y is chargeduntil the voltages of both batteries become equal. If it is judged thatthe voltages of both batteries are equal, in step S37 the switch 12 x isalso switched on, and if in step S38 it is judged that the charging ofboth batteries is completed, the process is terminated.

[0146] If in step S34 it is judged that the current direction of thebattery 14 x is not a discharging direction, in steps S39 through S41the same processes as in steps S27 through S29 in FIG. 35 are executed,and then the process flow moves to the process of step S37. If in stepS39 it is judged that the current direction of the battery 14 y is not adischarging direction, the flow immediately moves to the process of stepS38.

[0147] Next, if in step S32 it is judged that the charging is notperformed in a constant voltage mode, first, in step S42 both switches12 x and 12 y are switched off, and in step S43 the voltages of bothbatteries are compared. If the voltage of the battery 14 x is higherthan the voltage of the battery 14 y, of steps S44 and S45 the battery14 y is charged until the voltages of both batteries become equal, andthen the flow moves to the process of step S37. If the voltage of thebattery 14 y is higher than the voltage of the battery 14 x, in stepsS46 and S47 the battery 14 x is charged until the voltages of bothbatteries become equal, and then the flow moves to the process of stepS37.

[0148]FIG. 38 is a flowchart showing a process corresponding to theON/OFF control circuit of the sixth embodiment shown in FIG. 24. In FIG.38, first, the battery 14 x is discharged, and after discharging iscompleted, the battery 14 y is discharged. The process is basically thesame as that for charging as shown in FIG. 33, except that lastly instep S52 both switches are switched off.

[0149]FIG. 39 is a flowchart showing a process corresponding to theON/OFF control circuit of the seventh embodiment shown in FIG. 26. InFIG. 39, different control is performed depending on which switch is onin the charging state of a battery. If a battery status charges to adischarging state in a condition where the switch 12 x has been on in acharging state, in steps S53 through S56 the discharging is controlledin the same way as shown in FIG. 38.

[0150] On the other hand, if a battery status charges to a dischargingstate in a condition where the switch 12 y has been on in a chargingstate, in steps S57 through S59 the batteries, first, 14 y and then 14x, are discharged until the discharging of both batteries 14 y and 14 xis completed, and then in step S56 both switches are switched off.

[0151]FIG. 40 is a flowchart showing a process corresponding to theON/OFF control circuit of the eighth embodiment shown in FIG. 28. InFIG. 40, the same on/off control of the switches as in the chargecontrol shown in FIG. 36 is performed, and the discharging is performed.That is, as a result of the detection of the battery current direction,a switch corresponding to the battery in which the current direction isthe reverse of a target discharging is switched off, and discharging isperformed. Then, the current direction is detected for each a certaintime, and the control is maintained. Then, if in step S67 it is judgedthat the discharging of both batteries is completed, in step S68 bothswitches are switched off and the process is terminated.

[0152]FIG. 41 is a flowchart showing a process corresponding to theON/OFF control circuit of the ninth embodiment shown in FIG. 30. In FIG.41, the same on/off control of the switches as that for charging asshown in FIG. 35 is performed as a discharging control. That is, thedetections of the current directions of both batteries are performed, aswitch corresponding to the battery whose current flow is in a chargingdirection is switched off, and the other battery is discharged. Afterthe voltages of both batteries become equal, the former battery is alsodischarged. When in step S76 it is judged that the discharging of bothbatteries is completed, in step S77 both switches are switched off, andthe process is terminated.

[0153] Although the ON/OFF control circuits of the embodiments have beenso far described roughly classifying into when discharging and whencharging, it is natural that the charging embodiments and thedischarging embodiments can be used properly combined in an actual powersupply apparatus.

[0154] Furthermore, although the embodiments of the present inventionare described above for the case where two chargeable batteries areconnected in parallel, the number of the batteries is not limited totwo, and the on/off control method of the present invention can bebasically applied to the case of three or more batteries.

[0155] As so far described in detail, according to the presentinvention, by connecting a plurality of batteries and controllingswitches for switching on/off the charging/discharging current flowingin each battery, a current can be prevented from flowing from chargedbatteries to less-charged batteries, if there is some imbalance betweenthe charging states of the batteries, the charging energy of thebatteries can be effectively used, and the performance of a power supplyapparatus can be greatly improved.

What is claimed is:
 1. A power supply apparatus in which a plurality ofchargeable batteries are connected in parallel between the node of anexternal power source and a load, and the common ground of the externalpower source and the load, comprising: charge/discharge monitoring meansfor judging whether the external power source is in a charging statewhen the load is driven and a sufficient voltage for charging thebatteries is outputted, or in a discharging state when a sufficientvoltage is not outputted and a discharging current should be suppliedfrom the chargeable batteries to the load; switch means connected inseries to each of the plurality of batteries; and on/off controllingmeans for controlling the on/off operation of the switches according tothe output of the charge/discharge monitoring means and the charging/discharging state of each of the plurality of batteries.
 2. The powersupply apparatus according to claim 1 , further comprising: currentdetecting means for detecting the current flowing in each of saidplurality of batteries; and charge completion detecting means fordetecting the charge completion state of each of said plurality ofbatteries from the output of the current detecting means, wherein whensaid charge/discharge monitoring means judges that said external powersource is in a charging state, said on/off controlling means performs afirst control of switching on only said switch corresponding to one ofsaid plurality of batteries, then, when the charge completion detectingmeans detects the charging completion of one of the batteries, saidon/off controlling means performs a second control of switching off theswitched-on switch and a third control of switching on only said switchcorresponding to one each of the remaining batteries of which thecharging completion is not detected by the charge completion detectingmeans out of said plurality of batteries, and then, every time thecharge completion detecting means detects the charge completion of oneof the batteries, said on/off controlling means repeats the second andthird control processes.
 3. The power supply apparatus according toclaim 1 , further comprising: current detecting means for detecting thecurrent flowing in each of said plurality of batteries; chargecompletion detecting means for detecting the charging completion stateof each of said plurality of batteries from the output of the currentdetecting means; and voltage comparing means for comparing the voltagesof said plurality of batteries, and wherein when said charge/dischargemonitoring means judges that said external power source is in a chargingstate, said on/off controlling means performs a first control ofswitching on only said switch corresponding to a battery with a voltagejudged to be the lowest by the voltage comparing means, then, when thecharge completion detecting means detects the charge completion of saidbattery with the lowest voltage, said on/off controlling means performsa second control of switching off the switched-on switch and a thirdcontrol of switching on only said switch corresponding to a battery witha voltage judged to be the lowest by the voltage comparing means of theremaining batteries of which the charging completion is not detected outof said plurality of batteries, and then, every time the chargecompletion detecting means detects the charging completion of saidbattery with the lowest voltage, said on/off controlling means repeatsthe second and third control processes.
 4. The power supply apparatusaccording to claim 1 , further comprising: voltage equivalence detectingmeans for detecting the equivalence of the voltages between saidplurality of batteries; current detecting means for detecting a currentflowing in each of said plurality of batteries; and battery currentdirection judging means for judging from the output of the currentdetecting means whether a current flowing in each of said plurality ofbatteries is in a charging direction or in a discharging direction,wherein when said charge/discharge monitoring means judges that saidexternal power source is in a charging state, said on/off controllingmeans performs a control of switching off said switches corresponding tothe batteries of which the current flows in a discharging direction andcharging only the batteries of which the current flows in a chargingdirection, and then, every time a voltage equivalence is detectedbetween batteries corresponding to the switched-off switches and thebatteries during charging by the voltage equivalence detecting means,said on/off controlling means performs a control of switching on theswitched-off switches corresponding to the batteries of which thevoltage equivalence is detected by the voltage equivalence detectingmeans.
 5. The power supply apparatus according to claim 1 , furthercomprising: current detecting means for detecting a current flowing ineach of said plurality of batteries; and battery current directionjudging means for judging from the output of the current detecting meanswhether the current flowing in each of said plurality of batteries is ina charging direction or in a discharging direction, wherein when saidcharge/discharge monitoring means judges that said external power sourceis in a charging state, said on/off controlling means performs a firstcontrol of switching off said switches corresponding to the batteries inwhich the current is judged to flow in a discharging direction at thatmoment by the battery current direction judging means and charging onlythe batteries in which the current is judged to flow in a chargingdirection, and then, every time a predetermined charge time of thebatteries elapses, said on/off controlling means repeats the firstcontrol process.
 6. The power supply apparatus according to claim 1 ,further comprising; a direct current-direct current (DC-DC) converter,provided between the node of said external power source and said load,and the parallel node of said plurality of batteries, and controlled bypulse width modulation (PWM) when charging said plurality of batteries,for composing a direct discharging route from said plurality ofbatteries to said load when said plurality of batteries dischargecurrent to said load; constant voltage/constant current judging meansfor judging whether the DC-DC converter is constant-voltage-controlledso that the output voltage may become constant, orconstant-current-controlled so that the output current may becomeconstant; voltage comparing means for comparing the voltages of saidplurality of batteries; voltage equivalence detecting means fordetecting the equivalence of the voltages between said plurality ofbatteries; current detecting means for detecting the current flowing ineach of said plurality of batteries; and battery current directionjudging means judging from the output of the current detecting meanswhether the current flowing in each of said plurality of batteries is ina charging direction or in a discharging direction, wherein when saidcharge/discharge monitoring means judges that said external power sourceis in a charging state, if the constant voltage/constant current judgingmeans judges that the DC-DC converter is constant-voltage-controlled,said on/off controlling means performs a control of switching off saidswitches corresponding to the batteries in which the current is judgedto flow in a discharging direction by the battery current directionjudging means and charging only the batteries in which the current isjudged to flow in a charging direction, and then, every time a voltageequivalence is detected between the batteries corresponding to theswitched-off switches and the batteries during charging by the voltageequivalence detecting means, said on/off controlling means performs acontrol of switching on the switched-off switches corresponding to thebatteries of which the voltage equivalence is detected by the voltageequivalence detecting means, and if the constant voltage/constantcurrent judging means judges that the DC-DC converter isconstant-current-controlled, said on/off controlling means performs acontrol of switching on only said switches corresponding to thebatteries with voltages judged to be the lowest by the voltage comparingmeans, and then, every time a voltage equivalence is detected betweenthe batteries during charge and the other batteries by the voltageequivalence detecting means, said on/off controlling means performs acontrol of switching on the switched-off switches corresponding to thebatteries of which the voltage equivalence is detected by the voltageequivalence detecting means.
 7. The power supply apparatus according toclaim 6 , wherein said DC-DC converter comprises: a voltage erroramplifier for outputting a signal to constant-voltage-control said DC-DCconverter; a current error amplifier for outputting a signal toconstant-current-control said DC-DC converter, wherein said constantvoltage/constant current judging means comprises comparing means forcomparing the output of the voltage error amplifier and the output ofthe current error amplifier.
 8. The power supply apparatus according toclaim 6 , wherein said constant voltage/constant current judging meanscomprises voltage comparing means for comparing the output voltage ofsaid DC-DC converter and a predetermined reference voltage.
 9. The powersupply apparatus according to claim 1 , further comprising dischargecompletion detecting means for detecting a state where each of saidplurality of batteries completes discharging, wherein when saidcharge/discharge monitoring means judges that said external power sourceis in a discharging state, said on/off controlling means performs afirst control of switching on only said switch corresponding to onebattery out of said plurality of batteries, then, when the dischargecompletion detecting means detects the discharge of one battery, saidon/off controlling means performs a second control of switching off theswitched-on switch and a third control of switching on only said switchcorresponding to one battery out of the remaining batteries in which thedischarging completion is not detected by the discharge completiondetecting means, and then, every time the discharging completion of onebattery is detected by the discharge completion detecting means, saidon/off controlling means repeats the second and third control process.10. The power supply apparatus according to claim 1 , further comprisingdischarge completion detecting means for detecting a state where each ofsaid plurality of batteries completes discharging, wherein when saidcharge/discharge monitoring means detects that a status of said externalpower source charges from a charging state to a discharging state, saidon/off controlling means maintains the on/off operation of said switchin the charging state, then, every time the discharging completiondetecting means detects the discharging completion of any of thebatteries in which the corresponding switch is switched on, said on/offcontrolling means performs a control of switching off switchescorresponding to the batteries in which discharging completion isdetected by the discharge completion detecting means, then, when thedischarging completion of batteries corresponding to all the switchesswitched on in the charge state is detected by the discharge completiondetecting means, said on/off controlling means performs a control ofswitching on the switches switched off in the charging state.
 11. Thepower supply apparatus according to claim 1 , further comprising:discharge completion detecting means for detecting a state where each ofsaid plurality of batteries completes discharging; current detectingmeans for detecting the current flowing in each of said plurality ofbatteries; and battery current direction judging means for judging fromthe output of the current detecting means whether the current flowing ineach of said plurality of batteries is in a charging direction or in adischarging direction, wherein when said charge/discharge monitoringmeans detects that a status of said external power source charges from acharging state to a discharging state, said on/off controlling meansperforms a first control of switching off said switches corresponding tothe batteries in which the current is judged to flow in a chargingdirection at that moment by the battery current direction judging meansand discharging only the batteries in which the current is judged toflow in a discharging direction, and then, every time the predetermineddischarge times of the batteries elapse, said on/off controlling meansrepeats the first control process.
 12. The power supply apparatusaccording to claim 1 , further comprising: current detecting means fordetecting the current flowing in each of said plurality of batteries;battery current direction judging means for judging from the output ofthe current detecting means whether the current flowing in each of saidplurality of batteries is in a charging direction or in a dischargingdirection, and voltage equivalence detecting means for detecting theequivalence of the voltages between said plurality of batteries, whereinwhen said charge/discharge monitoring means judges that a status of saidexternal power source charges from a charging state to a dischargingstate, said on/off controlling means performs a control of switching offsaid switches corresponding to the batteries in which the current isjudged to flow in a charging direction at that moment by the batterycurrent direction judging means and discharging only the batteries inwhich the current is judged to flow in a discharging direction, andthen, every time a voltage equivalence is detected between the batteriescorresponding to the switched-off switches and the batteries duringdischarge by the voltage equivalence detecting means, said on/offcontrolling means performs a control of switching on the switched-offswitches corresponding to the batteries of which the voltage equivalenceis detected by the voltage equivalence detecting means.
 13. The powersupply apparatus according to claim 1 , further comprising currentdetecting means for detecting the current flowing in each of saidplurality of batteries, wherein said switch means is inserted betweensaid plurality of batteries and the current detecting means fordetecting the current of said plurality of batteries.
 14. The powersupply apparatus according to claim 1 , wherein said switch means isinserted between each of said plurality of batteries and said commonground.
 15. The power supply apparatus according to claim 1 , furthercomprising a direct current-direct current (DC-DC) converter, providedbetween the node of said external power source and said load, and theparallel node of said plurality of batteries and controlled by a pulsewidth modulation (PWM) when charging said plurality of batteries, forcomposing a direct discharging route from said plurality of batteries tosaid load when said plurality of batteries discharge current to saidload.
 16. A method for charging the plurality of batteries in a powersupply apparatus with a plurality of chargeable batteries, comprisingthe steps of: (a) charging one battery out of the plurality ofbatteries; (b) judging whether or not the charging of the battery duringcharging is completed; (c) when the charging of the battery is judged tobe completed in step (b), charging one battery out of the plurality ofremaining batteries other than a battery in which the charging iscompleted; and (d) repeating steps (b) and (c).
 17. A method forcharging the plurality of batteries in a power supply apparatus with aplurality of chargeable batteries, comprising the steps of: (a) charginga battery with the lowest voltage among the plurality of batteries; (b)judging whether or not the charging of the battery during charging iscompleted; (c) when the charging of the battery is judged to becompleted in step (b), charging a battery with the lowest voltage amongthe plurality of remaining batteries other than the battery in which thecharging is completed; and (d) repeating steps (b) and (c).
 18. A methodfor charging the plurality of batteries in a power supply apparatus witha plurality of chargeable batteries, comprising the steps of: (a)charging only the batteries out of the plurality of batteries in whichthe current flows in a charge direction when starting to charge; (b)detecting batteries of which the voltages become equal to the voltagesof the batteries during charging from the plurality of batteries, exceptfor those during charging; (c) charging the batteries detected in step(b); and (d) repeating steps (b) and (c).
 19. A method for charging theplurality of batteries in a power supply apparatus with a plurality ofchargeable batteries, comprising the steps of: (a) charging only thebatteries out of the plurality of batteries in which the current flowsin a charging direction when starting to charge; (b) when thepredetermined charging times of the batteries during charging elapse,detecting the direction of the current flowing in each of the pluralityof batteries; (c) charging only the batteries in which the currentdetected in step (b) flows in a charging direction; and (d) repeatingsteps (b) and (c).
 20. A method for charging a plurality of batteries ina power supply apparatus comprising a plurality of chargeable batteriesand a direct current-direct current (DC-DC) converter, provided betweenthe node of an external power source and a load, and the parallel nodeof the plurality of batteries and controlled by a pulse width modulation(PWM) when charging the plurality of batteries, for composing a directdischarging route from the plurality of batteries to the load when theplurality of batteries discharge current to the load, comprising thesteps of: (a) when charging said plurality of batteries, the DC-DCconverter judges whether the converter is constant-voltage-controlled sothat the output voltage may become constant, orconstant-current-controlled so that the output current may becomeconstant; (b) if it is judged in step (a) that the DC-DC converter isconstant-voltage-controlled, executing the following steps: (c) chargingonly the batteries out of the plurality of batteries in which thecurrent flows in a charge direction when starting to charge; (d)detecting batteries of which the voltages become equal to the voltagesof the batteries during charging from the plurality of batteries, exceptfor those during charging; (e) charging the batteries detected in step(d); and (f) repeating steps (d) and (e), and (g) if it is judged instep (a) that the DC-DC converter is constant-current-controlled,executing the following steps: (h) charging a battery with the lowestvoltage among the plurality of batteries; (i) detecting batteries ofwhich the voltages become equal to the voltages of the batteries duringcharging from the plurality of batteries, except for those duringcharging; (j) charging the batteries detected in step (i); and (k)repeating steps (i) and (j).
 21. A method for discharging the pluralityof batteries in a power supply apparatus with a plurality of chargeablebatteries, comprising the steps of: (a) when the status of the powersupply apparatus charges from a charging state of the batteries to adischarging state, making charged batteries discharge; (b) judgingwhether or not the discharging of the batteries during discharging iscompleted; (c) when in step (b) it is judged that the discharging of thebatteries is completed, making one battery out of the plurality ofremaining batteries other than a battery in which the discharging iscompleted, discharge; and (d) repeating steps (b) and (c).
 22. A methodfor discharging the plurality of batteries in a power supply apparatuswith a plurality of chargeable batteries, comprising the steps of: (a)making one battery out of the plurality of batteries discharge; (b)judging whether or not the discharging of the battery during dischargingis completed; (c) when in step (b) it is judged that the discharging ofthe battery is completed, making one battery out of the plurality ofremaining batteries other than a battery in which the discharging iscompleted, discharge; and (d) repeating steps (b) and (c).
 23. A methodfor discharging the plurality of batteries in a power supply apparatuswith a plurality of chargeable batteries, comprising the steps of: (a)discharging only the batteries out of the plurality of batteries inwhich the currents flow in a discharging direction when discharging isstarted; (b) when the discharging time during discharging exceeds apredetermined time, detecting the current directions of each of theplurality of batteries; (c) making only the batteries in which thecurrent directions detected in step (b) are discharging directionsdischarge; and (d) repeating steps (b) and (c).
 24. A method fordischarging the plurality of batteries in a power supply apparatus witha plurality of chargeable batteries, comprising the steps of: (a)discharging only the batteries out of the plurality of batteries inwhich the currents flow in a discharging direction when discharging isstarted; (b) detecting batteries of which the voltages become equal tothe voltage of the batteries during discharging from the plurality ofbatteries, except for those during discharging; (c) discharging thebatteries detected in step (b); and (d) repeating steps (b) and (c).